
package com.lee.fpflink; 
 
import com.lee.info.CkFlowInfo; 
import com.lee.logger.Logger; 
import org.apache.flink.api.java.functions.KeySelector; 
 
import java.util.ArrayList; 
import java.util.List; 
public class DataClassifyKeyByFunction implements KeySelector<CkFlowInfo, String> { 
 
    @Override
    public String getKey(CkFlowInfo data) throws Exception {
 
        return String.valueOf(data.hashCode() % 8);
    }
} 
 
 
 
